package com.isunny.mode.tactics.strategy;

import com.isunny.mode.tactics.annotation.Eviction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


/**
 * 先进先出淘汰策略
 *
 * @author luom
 * @date 2022/2/25
 */
@Eviction(value = "FIFO", desc = "先进先出策略")
@Component
public class FifoEvictionStrategy implements EvictionStrategy {

    private static final Logger log = LoggerFactory.getLogger(FifoEvictionStrategy.class);

    /**
     * 淘汰缓存
     */
    @Override
    public String evictionCache() {
        log.info("FIFO Eviction Strategy");
        return "FIFO Eviction Strategy";
    }
}
